<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <meta charset="UTF-8">
    <title>通用</title>

</head>
<body>

<!--    头部-->
<div th:fragment="head" class="layui-header layui-bg-green" >
    <div class="layui-logo layui-bg-red">餐饮美食商户管理平台</div>
    <!-- 头部区域（可配合layui已有的水平导航） -->
    <ul class="layui-nav layui-layout-left">
        <li class="layui-nav-item">
            <a th:href="@{/user/index-ui}">首页</a>
        </li>
    </ul>

    <div hidden id="headPortrait"><shiro:principal property="headPortrait"/> </div>
    <ul class="layui-nav layui-layout-right">
        <li class="layui-nav-item">
            <a href="javascript:;">

                <img id="img1" src="" class="layui-nav-img">
                <shiro:principal property="name"/>
            </a>
            <dl class="layui-nav-child">
                <dd><a href="">功能待更新</a></dd>
                <dd><a href="">功能待更新</a></dd>
            </dl>
        </li>
        <li class="layui-nav-item"><a th:href="@{/logout}">退了</a></li>
    </ul>
</div>

<!--左侧-->
<div th:fragment="left" class="layui-side layui-bg-black">
    <div class="layui-side-scroll">
        <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
        <ul class="layui-nav layui-nav-tree"  lay-filter="test">
            <!--            layui-nav-itemed  默认展开列表-->
            <li class="layui-nav-item layui-nav-itemed ">
                <a class="" href="javascript:;"><i class="layui-icon layui-icon-rate-solid"></i>  菜品</a>
                <dl class="layui-nav-child">
                    <dd ><a th:href="@{/food/category/index}">• 菜品类别</a></dd>
                    <dd > <a th:href="@{/food/record/index}">• 菜品档案</a></dd>
                    <dd ><a th:href="@{/food/taste/index}">• 菜品口味</a></dd>
                    <dd><a th:href="@{/food/specification/index}">• 规格管理</a></dd>
                    <dd ><a th:href="@{/food/material/index}">• 原料管理</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item ">
                <a class="" href="javascript:;"><i class="layui-icon layui-icon-template-1"></i>  库存</a>
                <dl class="layui-nav-child">
                    <dd><a th:href="@{/inventory/record/index}">• 菜品库存</a></dd>
                    <dd><a th:href="@{/inventory/material/index}">• 原料库存</a></dd>
                    <dd><a th:href="@{/purchase/orders/index}">• 采购单</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item ">
                <a class="" href="javascript:;"><i class="layui-icon layui-icon-form"></i>  报表</a>
                <dl class="layui-nav-child">
                    <dd><a th:href="@{/statement/orders/index}">• 订单报表</a></dd>
                    <dd><a th:href="@{/statement/record/index}">• 菜品流水</a></dd>
                    <dd><a th:href="@{/statement/recordValue/index}">• 菜品销量</a></dd>
                    <dd><a th:href="@{/statement/daily/index}">• 经营日报</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item ">
                <a class="" href="javascript:;"><i class="layui-icon layui-icon-rmb"></i>  促销</a>
                <dl class="layui-nav-child">
                    <dd><a th:href="@{/promotion/specialOffer/index}">• 特价折扣</a></dd>
                    <dd><a th:href="@{/promotion/mealHot/index}">• 套餐热卖</a></dd>
                    <dd><a th:href="@{/promotion/now/index}">• 当前促销</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item ">
                <a class="" href="javascript:;"><i class="layui-icon layui-icon-username"></i>  会员</a>
                <dl class="layui-nav-child">
                    <dd><a th:href="@{/member/category/index}">• 会员类别</a></dd>
                    <dd><a th:href="@{/member/set/index}">• 会员设置</a></dd>
                    <dd><a th:href="@{/member/manage/index}">• 会员管理</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item">
                <a href="javascript:;"><i class="layui-icon layui-icon-auz"></i>  门店</a>
                <dl class="layui-nav-child">
                    <dd><a th:href="@{/shop/assistant/index}">• 店员管理</a></dd>
                    <dd><a th:href="@{/shop/table/index}">• 桌位管理</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item">
                <a href="javascript:;"><i class="layui-icon layui-icon-set-fill"></i>  设置</a>
                <dl class="layui-nav-child">
                    <dd><a th:href="@{/set/pay/index}">• 支付设置</a></dd>
                    <dd><a th:href="@{/merchants/information/index}">• 商户资料</a></dd>
                </dl>
            </li>
        </ul>
    </div>
</div>

<!--底部-->
<div th:fragment="footer" class="layui-footer">
    <!-- 底部固定区域 -->
    © layui.com
</div>

<script th:src="@{/layui/layui.js}"></script>
<script>
    //JavaScript代码区域
    var a
    console.log(00)
    layui.use('element', function(){
        var element = layui.element;
        var $ = layui.$;


        console.log(1211)

        console.log(222)
        a = $("#headPortrait")

        $("#img1").attr("src",a[0].innerText)



    });

</script>

<script th:inline="javascript" th:fragment="baseUrl">
    baseUrl=[[@{/}]];
</script>

</body>
</html>